The functions described in this section initialize a part with an instrument, store instruments, list available instruments, manipulate parts, and get information about parts.
The MusicGetPartInstrumentNumber function returns the instrument number currently assigned to that part.
pascal ComponentResult MusicGetPartInstrumentNumber(
MusicComponent mc,
long part);
The MusicSetPartInstrumentNumber function initializes a part with a particular instrument.
pascal ComponentResult MusicSetPartInstrumentNumber(
MusicComponent mc,
long part,
long instrumentNumber);
You can use the MusicFindTone function MusicFindTone to find out an instrument number.
This function is superseded by MusicSetPartInstrumentNumberInterruptSafe , which can be called at interrupt time. You cannot call MusicGetPartInstrumentNumber at interrupt time.
The MusicSetPartInstrumentNumberInterruptSafe function initializes a part with a particular instrument.
pascal ComponentResult MusicSetPartInstrumentNumber(
MusicComponent mc,
long part,
long instrumentNumber);
You can use the MusicFindTone function MusicFindTone to find out an instrument number.
You can call the MusicSetPartInstrumentNumberInterruptSafe function at interrupt time.
The MusicGetPartAtomicInstrument function returns the atomic instrument currently in a part.
extern pascal ComponentResult MusicGetPartAtomicInstrument(
MusicComponent mc,
long part,
AtomicInstrument *ai,
long flags)
The MusicSetPartAtomicInstrument function initializes a part with an atomic instrument.
extern pascal ComponentResult MusicSetPartAtomicInstrument(
MusicComponent mc,
long part,
AtomicInstrumentPtr aiP,
long flags)
The MusicStorePartInstrument function puts whatever instrument is on the specified part into the synthesizer's instrument store. This enables you to store modified instruments.
pascal ComponentResult MusicStorePartInstrument(
MusicComponent mc,
long part,
long instrumentNumber);
The MusicGetInstrumentAboutInfo function gets the information about an instrument that appears in its About box.
pascal ComponentResult MusicGetInstrumentAboutInfo(
MusicComponent mc,long part,
InstrumentAboutInfo *iai);
The MusicGetInstrumentInfo function gets a list of instruments supported by a synthesizer. It also gets the names of the instruments.
extern pascal ComponentResult MusicGetInstrumentInfo(
MusicComponent mc,
long getInstrumentInfoFlags,
InstrumentInfoListHandle *infoListH)
The MusicGetPart function returns the MIDI channel and maximum polyphony for a particular part in the *MIDIChannel and *polyphony parameters.
pascal ComponentResult MusicGetPart(
MusicComponent mc,
long part,
long *MIDIChannel,
long *polyphony)
The MusicSetPart function sets the MIDI channel and maximum polyphony for the specified part to the values in the MIDIChannel and polyphony parameters.
pascal ComponentResult MusicSetPart(
MusicComponent mc,
long part,
long MIDIChannel,
long polyphony)
The MusicGetPartName function returns the string name of a part.
pascal ComponentResult MusicGetPartName(
MusicComponent mc,
long part,
StringPtr name);
You can use the MusicSetPartName function to change the name of an instrument in a specified part. For example, you might want to change the name of a modified instrument before saving it.
pascal ComponentResult MusicSetPartName(
MusicComponent mc,
long part,
StringPtr name);
The MusicGetPartKnob function gets the current value of a knob for a part.
pascal ComponentResult MusicGetPartKnob(
MusicComponent mc,
long part,
long knobID);
The MusicSetPartKnob function sets a knob for a specified part.
pascal ComponentResult MusicSetPartKnob(
MusicComponent mc,
long part,
long knobID,
long knobValue);
The MusicResetPart function silences all sounds on the specified part, and resets all controllers on that part to their default values. The default value is zero for all controllers except volume. Volume is set to its maximum 32767 or, in hexadecimal, 7F.FF .
pascal ComponentResult MusicResetPart(
MusicComponent mc,
long Part);
The MusicGetPartController function returns the value of the specified controller on the specified part.
pascal ComponentResult MusicGetPartController(
MusicComponent mc,
long part,
MusicController controllerNumber);
The MusicSetPartController function initializes the value of the specified controller on the specified part.
pascal ComponentResult MusicSetPartController(
MusicComponent mc,
long part,
MusicController controllerNumber,
long controllerValue);
The MusicSetPartSoundLocalization function passes sound localization data to a specified synthesizer part.
extern pascal ComponentResult MusicSetPartSoundLocalization(
MusicComponent mc,
long part,
Handle data)